<template>
    <div class="wrap">
        <group title="选择您将查看的企业">
            <cell-box v-for="(val,key) in companyList" :key="val.companyCode" is-link @click.native="foo(val.companyCode)">
                {{val.companyName}}
            </cell-box>
        </group>
    </div>
</template>

<script>
import Vue from 'vue'
import { Group, Cell,CellBox  } from 'vux'

import axios from '@/api/axios'
import api from '@/api/base.api'
import { mapState } from 'vuex'
export default {
    data(){
        return {
            companyList:[
                {
                    companyCode:123,
                    companyName:'美人鱼公司'
                },
                {
                    companyCode:123,
                    companyName:'美人鱼公司'
                },
                {
                    companyCode:123,
                    companyName:'美人鱼公司'
                }
            ]
        }
    },
    components: {
        Group,
        CellBox
    },
    mounted() {

    },
    computed: {
        ...mapState({
            //companyList: state => state.companyList
        })
    },
    methods: {
        foo(str){
            alert(str)
        },
        nav(idx) {
            console.log(idx);
            this.$router.push(`/overView/${this.companyList[idx].companyCode}/${this.companyList[idx].holderCode}`)
        }
    }
}
</script>

<style lang="less">
h3 {
    text-align: center;
    font-size: 18px;
    margin: 100px auto 20px;
}

.body {
    height: 100%;
}
</style>